
<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>考勤信息设置</title>

<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
<link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>
   
    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 13px;overflow-x:auto">
    <div class="page-heade">
       <h2 class="title_color text-center">默认考勤信息</h2>
    </div>
    <table class="table table-bordered bud_hei">
        <tr class="info text-center">
            <td>上班时间</td>
            <td>上班地点</td>
            <td>上班经度</td>
            <td>上班纬度</td>
            <td>下班时间</td>
            <td>下班地点</td>
            <td>下班经度</td>
            <td>下班纬度</td>
            <td>设定时间</td>
            <td>最后修改人</td>
            <td>操作</td>
        </tr>
        <tr>
            <td>09:00</td>
            <td>广东省广州市番禺大道北辅路</td>
            <td>113.355477</td>
            <td>23.00436</td>
            <td>18:00</td>
            <td>广东省广州市番禺大道北辅路</td>
            <td>113.355477</td>
            <td>23.00436</td>
            <td>2017-04-24 16:29</td>
            <td>梁景滔</td>
            <td><a href="javascript:;" id="setdefaultInfo">设置</a></td>
        </tr>
    </table>
    <div class="page-heade">
       <h2 class="title_color text-center">查看所有考勤信息</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei" style="margin-bottom: 0">
               <tr>
                <td class="text-right">分组名称</td>
                <td><input type="text" name="" class="form-control"></td>
                <td class="text-right">职员姓名</td>
                 <td><input type="text" name="" class="form-control"></td>
                 <td class="text-left">
                       <button class="btn-sm btn-info btn">查询</button><span class="lr_5"></span><button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button> 
                   </td>
               </tr>
        </table>
    </form>
  <div class="padding-10">
        <a href="javascript:;" class="btn btn-sm btn-info" id="addkaoqinfz">新增考勤分组</a>
  </div>
    <table class="table table-striped table-bordered table-hover bud_hei text-center" style="width: 100%;">
        <tr class="info">
            <th class="text-center">No.</th>
            <th class="text-center">分组名称</th>
            <th class="text-center">上班时间</th>
            <th class="text-center">上班地点</th>
            <th class="text-center">下班时间</th>
            <th class="text-center">下班地点</th>
            <th class="text-center">包含人数</th>
            <th class="text-center">创建人</th>
            <th class="text-center">创建时间</th>
            <th class="text-center">修改人</th>
            <th class="text-center">修改时间</th>
            <th class="text-center">操作</th>
        </tr>
        <tbody>
            <tr>
                <td>1</td>
                <td>广东省佛山市顺德区江义大道东三路10</td>
                <td>09:00</td>
                <td class="gystext">广东省佛山市顺德区江义大道东三路</td>
                <td>18:00</td>
                <td class="gystext">广东省佛山市顺德区江义大道东三路</td>
                <td><a href="{:url('Other/clockingfzlidt')}">1</a></td>
                <td>系统管理员</td>
                <td>2017-04-20</td>
                <td>系统管理员</td>
                <td>2017-04-20</td>
                <td><a href="javascript:;">修改</a>&nbsp;<a href="javascript:;">删除</a></td>
            </tr>
    </tbody>
    </table>
   <!--  <h5 class="text-center"  style="font-size: 13px;font-weight: 500">
                    总共有12条记录，第1/2页,当前页<input id="page" type="text"  style="width: 40px" value="1"/><span id="gopage">Go</span>&nbsp;&nbsp;<span id="fistpage">首页</span>&nbsp;&nbsp;
                    每页显示
                    <select id="pagesize">
                        <option value='10' selected>10条</option>
                        <option value='15'>15条</option>
                        <option value='20'>20条</option>

                    </select>
                </h5> -->
 <!--    <h3 class="text-center"><img src="__STATIC__/layout/img/zwsj.png"></h3> -->
<div class="ibox-content" style="display: none;" id="addlaborcontractDiv">
    <input type="text" style="width: 120px;display: inline-block;" class="form-control"><button class="btn btn-sm btn-info" type="button">搜索</button>
    <div class="" style="height: 300px"></div>
    <h2 style="font-size: 16px">指掌云软件</h2>
    <form action="" class="form-inline">
        <table class="table table-bordered">
            <tr>
              <td style="width: 120px">上班地点<span class="colorRed">*</span></td>
              <td colspan="5"><input type="text" class="form-control" value="上海市上海市黄兴路217号二钢明珠楼A座" size="45"></td>
            </tr>
            <tr>
              <td style="width: 120px">上班时间<span class="colorRed">*</span></td>
              <td><input type="text" class="form-control" id="startsban"></td>
              <td>上班经度</td>
              <td><input type="text" class="form-control" size="16" readonly value="113.355477"></td>
              <td>上班纬度</td>
              <td><input type="text" class="form-control" size="16" readonly value="23.005477"></td>
            </tr>
             <tr>
              <td style="width: 120px">下班地点<span class="colorRed">*</span></td>
              <td colspan="5"><input type="text" class="form-control" value="上海市上海市黄兴路217号二钢明珠楼A座" size="45"></td>
            </tr>
              <tr>
              <td style="width: 120px">下班时间<span class="colorRed">*</span></td>
              <td><input type="text" class="form-control" id="endxban"></td>
              <td>上班经度</td>
              <td><input type="text" class="form-control" size="16" readonly value="113.355477"></td>
              <td>上班纬度</td>
              <td><input type="text" class="form-control" size="16" readonly value="23.005477"></td>
            </tr>
        </table>
    </form>
</div>

<div class="ibox-content" style="display: none;" id="addkaoqinfzDiv">
    <input type="text" style="width: 120px;display: inline-block;" class="form-control"><button class="btn btn-sm btn-info" type="button">搜索</button>
    <div class="" style="height: 300px"></div>
    <h2 style="font-size: 16px">指掌云软件</h2>
    <form action="" class="form-inline">
        <table class="table table-bordered">
            <tr>
                <td>分组名称<span class="colorRed">*</span></td>
                <td colspan="5"><input type="text" class="form-control" name="" id=""></td>
            </tr>
            <tr>
                <td>员工姓名<span class="colorRed">*</span></td>
                <td colspan="5">
                      <div class="input-group">
                            <input id="area_id" type="text" placeholder="请输入关键字或空格查询"
                                   class="form-control" value="" style="min-width: 300px;width: 300px">
                            <div class="input-group-btn">
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    <a href="javascript:;" id="select_area" class="btn btn-primary btn-sm">选择</a>
                </td>
            </tr>
            <tr>
                <td></td>
                <td colspan="5"></td>
            </tr>
            <tr>
              <td style="width: 120px">上班地点<span class="colorRed">*</span></td>
              <td colspan="5"><input type="text" class="form-control" value="上海市上海市黄兴路217号二钢明珠楼A座" size="45"><button class="btn btn-info btn-sm" type="button">清除上班地址</button></td>
            </tr>
            <tr>
              <td style="width: 120px">上班时间<span class="colorRed">*</span></td>
              <td><input type="text" class="form-control" id="startsban"></td>
              <td>上班经度</td>
              <td><input type="text" class="form-control" size="16" readonly value="113.355477"></td>
              <td>上班纬度</td>
              <td><input type="text" class="form-control" size="16" readonly value="23.005477"></td>
            </tr>
             <tr>
              <td style="width: 120px">下班地点<span class="colorRed">*</span></td>
              <td colspan="5"><input type="text" class="form-control" value="上海市上海市黄兴路217号二钢明珠楼A座" size="45"><button class="btn btn-info btn-sm" type="button">清除下班地址</button></td>
            </tr>
              <tr>
              <td style="width: 120px">下班时间<span class="colorRed">*</span></td>
              <td><input type="text" class="form-control" id="endxban"></td>
              <td>上班经度</td>
              <td><input type="text" class="form-control" size="16" readonly value="113.355477"></td>
              <td>上班纬度</td>
              <td><input type="text" class="form-control" size="16" readonly value="23.005477"></td>
            </tr>
        </table>
    </form>
</div>
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>

  <script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    $(function () {
        $('body').on('click','input[type=text]',function () {
            this.select()
        })
    })
</script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script src="__STATIC__/layout/js/plugins/laydate/laydate.js"></script>
<script>
    $(document).ready(function () {
        // $("#checkmyrecord").click(function(){
        //     var str='<div class="ibox-content"><form class="form-inline"><table class="table table-bordered bud_hei"><tr><td style="width:100px">员工姓名:</td><td colspan="7">张晓明</td></tr><tr><td>上班地点:</td><td>广东省广州市番禺区番禺大道北辅路</td><td style="width:100px">上班时间:</td><td>09:00</td><td style="width:100px">上班经度:</td><td>113.148923</td><td style="width:100px">上班纬度:</td><td>213.148923</td></tr><tr><td>上班地点:</td><td>广东省广州市番禺区番禺大道北辅路</td><td style="width:100px">下班时间:</td><td>18:00</td><td style="width:100px">下班经度:</td><td>113.148923</td><td style="width:100px">下班纬度:</td><td>213.148923</td></tr></table><div class="padding-10 text-center"><button class="btn btn-warning">关闭</button></div></form></div>'
        //      layer.open({
        //         type: 1,
        //         title: '查看考勤信息',
        //          area: ['1000px', '400px'],
        //         fixed: false, //不固定
        //         maxmin: true,
        //         content: str
        //     });
        //     return false
        // })
  

        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })   

$(document).ready(function(){
     var $gysText=$(".gystext");
                 var num =3;
                 $gysText.each(function(){
                     wordlimit($(this),num)
                 })
})

/*超出省略*/
   function wordlimit(cname,num){
　          for(var i=0;i<cname.length;i++){
　　　　　　var nowLength=cname[i].innerHTML.length;
                if(nowLength>num){
                  return cname[i].innerHTML=cname[i].innerHTML.substr(0,num)+'...'
                  }
                }
              }


/*设置默认考勤信息*/
$("#setdefaultInfo").click(function(){
     layer.open({
                           type: 1,
                           title: '设置默认考勤信息',
                           area: ['750px', '550px'],
                           fixed: false, //不固定
                           maxmin: true,
                           content: $('#addlaborcontractDiv'),
                           btn:["提交","返回"]
                        /*   yes: function (i, o) {
                               var param = $('#form1').serialize()
                           $.post('/index/workflowdb/ysfy_cg.html', param, function (data) {
                               if (data.success) {
                                   swal({title: data.msg}, function () {
                                       layer.close(i)
                                       location.reload()
                                   })
                               } else {
                                   swal(data.msg)
                               }
                           }, 'json')
                       }
*/
                    });

})

/*新增考勤分组*/
$("#addkaoqinfz").click(function(){
 layer.open({
                           type: 1,
                           title: '设置考勤信息',
                           area: ['950px', '550px'],
                           fixed: false, //不固定
                           maxmin: true,
                           content: $('#addkaoqinfzDiv'),
                           btn:["提交","返回"]
                        /*   yes: function (i, o) {
                               var param = $('#form1').serialize()
                           $.post('/index/workflowdb/ysfy_cg.html', param, function (data) {
                               if (data.success) {
                                   swal({title: data.msg}, function () {
                                       layer.close(i)
                                       location.reload()
                                   })
                               } else {
                                   swal(data.msg)
                               }
                           }, 'json')
                       }
*/
                    });
})

laydate.render({
  elem: '#startsban',
  format:'HH:mm',
  type: 'time'
});
laydate.render({
  elem: '#endxban',
  format:'HH:mm',
  type: 'time'
});

 var jieshou = $("#area_id");
 sousuo(jieshou);
       function sousuo(id){
            id.bsSuggest({
            allowNoKeyword: false, //是否允许无关键字时请求数据
            multiWord: true, //以分隔符号分割的多关键字支持
            separator: ",", //多关键字支持时的分隔符，默认为空格
            getDataMethod: "url", //获取数据的方式，总是从 URL 获取
            url: 'http://unionsug.baidu.com/su?p=3&t=' + (new Date()).getTime() + '&wd=',
            /*优先从url ajax 请求 json 帮助数据，注意最后一个参数为关键字请求参数*/
            jsonp: 'cb',
            /*如果从 url 获取数据，并且需要跨域，则该参数必须设置*/
            processData: function (json) { // url 获取数据时，对数据的处理，作为 getData 的回调函数
                var i, len, data = {
                    value: []
                };
                if (!json || !json.s || json.s.length === 0) {
                    return false;
                }

                // console.log(json);
                len = json.s.length;

                jsonStr = "{'value':[";
                for (i = 0; i < len; i++) {
                    data.value.push({
                        word: json.s[i]
                    });
                }
                data.defaults = 'baidu';

                //字符串转化为 js 对象
                return data;
            }
        });

          }

</script>
</body>

</html>